﻿using Entity.Models.Entities;
using System;
using System.Collections.Generic;
using System.Text;

namespace Entity.Models.dto
{
    /// <summary>
    /// 菜单管理DTO 
    /// </summary>
    public class MenuInfoDTO
    {

        /// <summary>
        /// id
        /// </summary>
        public string Id { get; set; }
        /// <summary>
        /// 标题
        /// </summary>
        public string _title { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        public string _description { get; set; }

        /// <summary>
        /// 等级
        /// </summary>
        public int _level { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int _sort { get; set; }

        /// <summary>
        /// 访问地址
        /// </summary>
        public string _href { get; set; }

        /// <summary>
        /// 父菜单id
        /// </summary>
        public string _parentId { get; set; }

        /// <summary>
        /// 图标样式
        /// </summary>
        public string _icon { get; set; }

        /// <summary>
        /// 目标
        /// </summary>
        public string _target { get; set; }


        /// <summary>
        /// 创建时间
        /// </summary>
        public string _createTime { get; set; }
        //构造
        public MenuInfoDTO(MenuInfo menuInfo)
        {
            Id = menuInfo.Id;
            _title = menuInfo.Title;
            _description = menuInfo.Description;
            _level = menuInfo.Level;
            _sort = menuInfo.Sort;
            _href = menuInfo.Href;
            _parentId = menuInfo.ParentId;
            _icon = menuInfo.Icon;
            _createTime = menuInfo.CreateTime.ToString("yyyy-MM-dd HH:mm:ss");
        }

        public MenuInfoDTO()
        {
        }
    }
}
